package com.file;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.nanquan.dotjava.util.ConvertUtil;

public class ReadFileFromDB {
	
	public static void main(String[] args) throws IOException {
		
		File file = new File("C:\\Documents and Settings\\Administrator\\桌面\\temp\\test\\testwhdoc.txt");
		String fileStr = FileUtils.readFileToString(file);
		byte[] data = ConvertUtil.hexStringToByte(fileStr);
		File fileNew = new File("C:\\Documents and Settings\\Administrator\\桌面\\temp\\test\\whdoc.xls");
		FileUtils.writeByteArrayToFile(fileNew , data);
		
	}

}
